<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: liudao
  Date: 2022/8/2
  Time: 19:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>pagecontext作用域示例</title>
</head>
<body>
<%
    List<String> heros = new ArrayList<String>();
    heros.add("潮汐海灵");
    heros.add("无极剑圣");
    session.setAttribute("heros",heros);
    response.sendRedirect("/herolist.jsp");
//    request.getRequestDispatcher("/herolist.jsp").forward(request,response);
    //session的作用域是整个浏览器，只要不关闭就可以共享sessionid
%>
</body>
</html>
